<?php $this->load->view('admin/header_layout'); ?>


<div class="row">
    <div class="btn-group">
        <?php echo anchor('admin/topic', 'Topics', 'class="btn active"'); ?>
        <?php echo anchor('threads/', 'Threads', 'class="btn"'); ?>
        <?php echo anchor('admin/replied', 'Replied', 'class="btn"'); ?>
        <?php echo anchor('admin/other_request/other_requested', 'Other Request', 'class="btn"'); ?>
    </div>
</div>
<br />
<div class="marg20-btm">
</div>
<br />
<table class="table table-bordered table-striped">
    <thead>
        <tr>
            <th><input type="checkbox" class="check-all" value="" /></th>
            <th>ID</th>
            <th>Topic</th>
            <th>Content</th>
            <th>Publish Date</th>
            <th>Author</th>
            <th>Status</th>
            <th>Action </th>
        </tr>
    </thead>
    <tbody>
        <?php
        //if(count($results)){

        if ($results) {
            foreach ($results as $row) {
                echo '
                               <tr>
                                 <td><input type="checkbox" /></td>
                                 <td>' . $row->picr_id . '</td>
								 <td>' . $row->picr_title . '</td>
								 <td>' . $row->picr_content . '</td>
								 <td>' . $row->picr_dated . '</td>
								 <td>' . $row->picr_author . '</td>
                                 <td>' . $row->picr_status . '</a></td>
                                 <td>' . btn_edit('admin/topic_request/edit/' . $row->picr_id) . '  ' . btn_delete('admin/topic_request/delete/' . $row->picr_id) . '</td>
                               </tr>';
            }
        } else {
            echo "<h3>No record found</h3>";
        }
        ?>
    </tbody>
</table>
<div class="form-inline">
    <select>
        <option />Bulk Actions 
        <option />Delete 
    </select>
    <input type="submit" value="Submit" class="btn btn-primary" onClick="return confirm('Are you sure ?');" />
</div>
<div class="pagination">
    <ul>
        <?php echo $links; ?>
    </ul>
</div>
</div>

